package com.todo.pro.enums;

public enum UserDefaultHeadEnum {

	boy1(0, "http://pic.todo.team-union.com/image/head/boy_pic_01.png"),
	boy2(1, "http://pic.todo.team-union.com/image/head/boy_pic_02.png"),
	boy3(2, "http://pic.todo.team-union.com/image/head/boy_pic_03.png"),
	boy4(3, "http://pic.todo.team-union.com/image/head/boy_pic_04.png"),
	boy5(4, "http://pic.todo.team-union.com/image/head/boy_pic_05.png"),
	gril1(5, "http://pic.todo.team-union.com/image/head/girl_pic_01.png"),
	gril2(6, "http://pic.todo.team-union.com/image/head/girl_pic_02.png"),
	gril3(7, "http://pic.todo.team-union.com/image/head/girl_pic_03.png"),
	gril4(8, "http://pic.todo.team-union.com/image/head/girl_pic_04.png"),
	gril5(9, "http://pic.todo.team-union.com/image/head/girl_pic_05.png");

	private String name;
	private int index;

	private UserDefaultHeadEnum(int index, String name) {
		this.index = index;
		this.name = name;
	}

	public static String getRandom() {

		int index = (int) (Math.random() * 10);
		
		System.out.println(index);
		
		for(UserDefaultHeadEnum item : UserDefaultHeadEnum.values()) {
			if(item.index == index) {
				return item.name;
			}
		}
		
		return boy1.name;
	}

}
